<template>
  <div class="particulars">
    <v-detail
      :detailData="inputData"
      :inputConfig="inputConfig"
      :rules="rules"
      ref="input"
    ></v-detail>
  </div>
</template>

<script>
import detail from "commons/Detail";
import baseMixin from "@/mixins/BaseMixin";

export default {
  name: "particulars",
  mixins: [baseMixin],
  props: {
    inputData: {
      type: Object,
    },
  },
  data() {
    return {
      whseidflag: false,
      flag: false,
      rules: {
        lottablevalidationkey: [
          { required: true, message: "清选择订单类型说明", trigger: "blur" },
        ],
        description: [
          { required: true, message: "清填写序列", trigger: "blur" },
        ],
      },
    };
  },
  computed: {
    inputConfig() {
      return [
        [
          {
            type: "input",
            label: this.$t("outbound.lottablevalidation"),
            props: "lottablevalidationkey",
            disabled: this.flag,
          },
          {
            type: "input",
            label: this.$t("common.desc"),
            props: "description",
            disabled: this.whseidflag || this.flag,
          },
        ],
        [
          {
            type: "",
            label: this.$t("config.batchProp", { no: "01" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "02" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "03" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "04" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "05" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "06" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "07" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "08" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "09" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "10" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "11" }),
            props: "",
            disabled: true,
          },
          {
            type: "",
            label: this.$t("config.batchProp", { no: "12" }),
            props: "",
            disabled: true,
          },
        ],
        [
          {
            type: "checkbox",
            label: this.$t('outbound.show'),
            props: "showlottable01onrfreceipt",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "showlottable02onrfreceipt",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "showlottable03onrfreceipt",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "showlottable04onrfreceipt",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "showlottable05onrfreceipt",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "showlottable06onrfreceipt",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "showlottable07onrfreceipt",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "showlottable08onrfreceipt",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "showlottable09onrfreceipt",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "showlottable10onrfreceipt",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "showlottable11onrfreceipt",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "showlottable12onrfreceipt",
            disabled: this.whseidflag || this.flag,
          },
        ],
        [
          {
            type: "checkbox",
            label: this.$t('outbound.requiredItem'),
            props: "lottable01onrfreceiptmandatory",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "lottable02onrfreceiptmandatory",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "lottable03onrfreceiptmandatory",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "lottable04onrfreceiptmandatory",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "lottable05onrfreceiptmandatory",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "lottable06onrfreceiptmandatory",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "lottable07onrfreceiptmandatory",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "lottable08onrfreceiptmandatory",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "lottable09onrfreceiptmandatory",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "lottable10onrfreceiptmandatory",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "lottable11onrfreceiptmandatory",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "lottable12onrfreceiptmandatory",
            disabled: this.whseidflag || this.flag,
          },
        ],
        [
          {
            type: "checkbox",
            label: this.$t('outbound.comminglelottable1'),
            props: "comminglelottable1",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "comminglelottable2",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "comminglelottable3",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "",
            hidden: "0",
            disabled: true,
          },
          {
            type: "checkbox",
            label: "",
            props: "",
            hidden: "0",
            disabled: true,
          },
          {
            type: "checkbox",
            label: "",
            props: "comminglelottable6",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "comminglelottable7",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "comminglelottable8",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "comminglelottable9",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "comminglelottable10",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "checkbox",
            label: "",
            props: "",
            hidden: "0",
            disabled: true,
          },
          {
            type: "checkbox",
            label: "",
            props: "",
            hidden: "0",
            disabled: true,
          },
        ],
        [
          {
            type: "input",
            label: this.$t('outbound.rflabel01'),
            props: "rflabel01",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "rflabel02",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "rflabel03",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "rflabel04",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "rflabel05",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "rflabel06",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "rflabel07",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "rflabel08",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "rflabel09",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "rflabel10",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "rflabel11",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "rflabel12",
            disabled: this.whseidflag || this.flag,
          },
        ],
        [
          {
            type: "input",
            label: this.$t('outbound.generatemask01'),
            props: "generatemask01",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "generatemask02",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "generatemask03",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "generatemask04",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "generatemask05",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "generatemask06",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "generatemask07",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "generatemask08",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "generatemask09",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "generatemask10",
            disabled: this.whseidflag || this.flag,
          },
        ],
        [
          {
            type: "select",
            label: this.$t('outbound.maskgenrule01'),
            props: "maskgenrule01",
            disabled: this.whseidflag || this.flag,
            options: this.getOptions("querycodeLkup/LOTMASKRUL"),
          },
          {
            type: "select",
            label: " ",
            props: "maskgenrule02",
            disabled: this.whseidflag || this.flag,
            options: this.getOptions("querycodeLkup/LOTMASKRUL"),
          },
          {
            type: "select",
            label: " ",
            props: "maskgenrule03",
            disabled: this.whseidflag || this.flag,
            options: this.getOptions("querycodeLkup/LOTMASKRUL"),
          },
          {
            type: "input",
            label: " ",
            props: "maskgenrule04",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "maskgenrule05",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "select",
            label: " ",
            props: "maskgenrule06",
            disabled: this.whseidflag || this.flag,
            options: this.getOptions("querycodeLkup/LOTMASKRUL"),
          },
          {
            type: "select",
            label: " ",
            props: "maskgenrule07",
            disabled: this.whseidflag || this.flag,
            options: this.getOptions("querycodeLkup/LOTMASKRUL"),
          },
          {
            type: "select",
            label: " ",
            props: "maskgenrule08",
            disabled: this.whseidflag || this.flag,
            options: this.getOptions("querycodeLkup/LOTMASKRUL"),
          },
          {
            type: "select",
            label: " ",
            props: "maskgenrule09",
            disabled: this.whseidflag || this.flag,
            options: this.getOptions("querycodeLkup/LOTMASKRUL"),
          },
          {
            type: "select",
            label: " ",
            props: "maskgenrule10",
            disabled: this.whseidflag || this.flag,
            options: this.getOptions("querycodeLkup/LOTMASKRUL"),
          },
        ],
        [
          {
            type: "input",
            label: this.$t('outbound.genmaxlength01'),
            props: "genmaxlength01",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "genmaxlength02",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "genmaxlength03",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "genmaxlength04",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "genmaxlength05",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "genmaxlength06",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "genmaxlength07",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "genmaxlength08",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "genmaxlength09",
            disabled: this.whseidflag || this.flag,
          },
          {
            type: "input",
            label: " ",
            props: "genmaxlength10",
            disabled: this.whseidflag || this.flag,
          },
        ],
      ];
    },
  },
  methods: {},
  mounted() {
    if (this.$store.state.wms.toUpperCase().includes("WMWHSE")) {
      //仓库级
      this.flag = true;
    }
    if (Object.keys(this.$store.state.skip).length !== 0) {
      let data = this.$store.state.skip;
      if (data.newFlag) {
        this.flag = false;
      } else {
        this.flag = true;
      }
    } else if (this.$store.state.newFlag) {
      this.flag = false;
    } else {
      this.flag = true;
    }
  },
  components: {
    "v-detail": detail,
  },
};
</script>

<style scoped></style>
